package com.ams.server.handler;

import java.util.concurrent.ExecutorService;
import com.ams.io.network.connection.Connection;

public abstract class ProtocolHandler implements Runnable {
    protected Connection conn;
    protected ExecutorService executor;

    public void setConnection(Connection conn) {
        this.conn = conn;
    }

    public void setExecutor(ExecutorService executor) {
        this.executor = executor;
    }

    public abstract ProtocolHandler handlerFactory();

    public boolean isKeepAlive() {
        return false;
    }

    public void close() {
        conn.close();
    }

}